]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
StShadowHelper: properly use the actor's box to paint the shadow
authorRui Matos <tiagomatos@gmail.com>
Wed, 22 Jun 2016 18:57:17 +0000 (20:57 +0200)
committerRui Matos <tiagomatos@gmail.com>
Thu, 23 Jun 2016 16:57:02 +0000 (18:57 +0200)
We're using an unitialized box resulting in an undefined shadow box
size.

_st_paint_shadow_with_opacity() already computes the shadow's bounding
box from the source actor's box so we just need to pass that along.

https://bugzilla.gnome.org/show_bug.cgi?id=767954

src/st/st-shadow.c

index 49e411ce5c5456ff91bf517ede77306ce9bc0d6b..dbd3f8e3a7ebb416d8028033dab6876e2cc35992 100644 (file)
@@ -287,13 +287,8 @@ st_shadow_helper_paint (StShadowHelper  *helper,
                         ClutterActorBox *actor_box,
                         guint8           paint_opacity)
 {
-  ClutterActorBox allocation;
-  float width, height;
-
-  clutter_actor_box_get_size (actor_box, &width, &height);
-
   _st_paint_shadow_with_opacity (helper->shadow,
                                  helper->pipeline,
-                                 &allocation,
+                                 actor_box,
                                  paint_opacity);
 }